from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def index(request):
    print('给我一个首页...')
   # return HttpResponse('首页')
   # 字典类型
    context = {
        'name': '赵嫣然',
        'sex': '女'
    }
    return render(request, 'index.html', context)


from django.views import View


class RegisterView(View):
    def get(self, request):
        return render(request, 'register.html')

    def post(self, request):
        return HttpResponse('注册成功')

    def delete(self, request):
        return HttpResponse(' 删除成功')

    def put(self, request):
        return HttpResponse('修改成功')
